<template>
    <div class="goods"> 
        <div class="page-head">

        </div>
        <div class="content">
            <div class="goods-img"></div>
        </div>
        <div class="price_box">
            <p class="headline">支付金额</p>
            <p class="item">实际支付金额： <span>1.2元</span></p>
            <p class="item~">充值实际抵扣金额： <span>10元</span></p>
        </div>
        <div class="page_btn flex row center" @click="payClick">立即支付</div>
    </div>
</template>
<script>
import {  onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import api from '../api/index'
import { showToast} from 'vant'
export default {
  component: {
   
  },
  setup() {
    onMounted(() => {
    
      // methods.init()
    })
    const router = useRouter()
    const methods = {
        payClick(){
            window.open('https://www.qhdyywlkj.com/api/tenant/payment/brushPay?amount=1.2')
            setTimeout(()=>{
                router.push({
                  path: '/goodsMessage',
                })
            })
        }  
    }

    return {
      ...methods,
    }
  }
}
</script>
<style lang="scss" scoped>
*, *:before, *:after {
    box-sizing: border-box;
    margin: 0;
    position: relative;
    font-weight: 400;
  }

.goods{
    font-size: .12rem;
    .page-head {
        width: 100vw;
        height: 2.2rem;
        background: url(../../../assets/img/goods_head.png) no-repeat;
        background-size: 100% auto;
    }
    .content{
        width: 96%;
        margin: auto;
        background-color: #fff;
        margin-top: -0.2rem;
        .goods-img{
            width: 100%;
            height: 0.6rem;
            background: url(../../../assets/img/goods-content.png) no-repeat;
            background-size: 100% auto;
        }
        
    }
    .price_box {
        width: 96%;
        margin :auto;
        text-align: left;
        height: 0.8rem;
        background-color: #fff;
        border-radius: 0.06rem;
        margin-top: 0.12rem;
        padding: 0.1rem;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        span{
            color: #3C83F5;
        }
    }
    .page_btn {
        width: 85%;
        margin: auto;
        height: 0.35rem;
        border-radius: 0.35rem;
        line-height:0.35rem;
        background-color: #EF311F;
        margin-top: 0.3rem;
        font-weight: 600;
        color: #fff;
        font-size: 0.16rem;
        position: relative;
    }
    .page_btn::after {
        position: absolute;
        content: '1.2元';
        right: 0.1rem;
        color: #FF3421;
        font-size: 0.12rem;
        text-align: center;
        line-height: 0.15rem;
        top: -0.13rem;
        display: block;
        width: 0.4rem;
        height: 0.15rem;
        border-top-right-radius: 0.16rem;
        border-top-left-radius: 0.26666rem;
        border-bottom-right-radius: 0.26667rem;
        background: linear-gradient(272deg, #FFFDB8 10.96%, #FFBE72 105.66%), #FF3E3E;
    }
}
</style>